#!/usr/bin/python3
from typing import List
import pandas as pd
import dto


def TjDataToPD(items: List[dto.SharesDto]) -> pd.DataFrame:
    """"""
    datDict = {'open': [], 'close': [], 'preClose': [], 'high': [], 'low': [], 'volume': [], 'amount': [], 'pctChg': [],
               'change': []}
    datItems = []
    for d in items:
        """"""
        datDict['open'].append(d.open)
        datDict['close'].append(d.close)
        datDict['preClose'].append(d.preClose)
        datDict['high'].append(d.high)
        datDict['low'].append(d.low)
        datDict['volume'].append(d.volume)
        datDict['amount'].append(d.amount)
        datDict['pctChg'].append(d.pctChg)
        datDict['change'].append(d.change)
        datItems.append(d.date)
    return pd.DataFrame(datDict, index=datItems)


def DfToIndicator(items: List[dto.SharesDto]) -> pd.DataFrame:
    """"""

